<?php
@session_start();
if(!isset($_SESSION['usuCod'])){   
	echo "<script>window.location.href='index.php'</script>";
}

require_once('lib/conexion.php');

switch($_REQUEST['accion']){
 case 3: //Mostrar Crear Usuario =====================================================================
		$sql3a="SELECT us.peru_codigo  FROM usuarios us INNER JOIN perfiles_usuarios pu ON pu.peru_codigo=us.peru_codigo
		WHERE us.usu_codigo=".$_SESSION['usuCod']." AND us.usu_estado='A' ";
		$rs3a=mysql_query($sql3a);
		$row3a=mysql_fetch_array($rs3a);

        $sql0c="SELECT req_codigo, req_referencia FROM requisitos WHERE  req_fechaVencimiento >= CURDATE() AND usu_codSeguimiento=".$_SESSION['usuCod']." order by req_referencia  asc";
		$rs0c=mysql_query($sql0c);
         ?>
        <script type="text/javascript">
           function jsFunction(){
                    var myselect = document.getElementById("selectOpt");
                    // alert(myselect.options[myselect.selectedIndex].value);
                    $('#div_creaUs').load("planActReq_envia.php?accion=3&var=200&item="+myselect.options[myselect.selectedIndex].value);
           }
         </script>

            <script src="js/funciones.valiClav.js"></script>

            <h1>Planificaci&oacute;n  de Actividades</h1>

            <label>
             <div id="div_mensaje_2" style="display:none;"> </div>
            </label>

            <form enctype="multipart/form-data" name="form1" action="reqEjec.php" id="form1" class="panel-container">
                     <b>Requisito Legal</b><br />
                     <select onChange="jsFunction()" id="selectOpt">
                  <option value=""  onclick="jsFunction()">Seleccione un Requisito Legal...</option>
                     <?
                    while($list_tipoacti=mysql_fetch_array($rs0c)){
					     $codigo_tipoacti=$list_tipoacti['req_codigo'];
						 $nombre_tipoacti=utf8_encode($list_tipoacti['req_referencia']);
					     echo '<option value="'.$codigo_tipoacti.'">'.$nombre_tipoacti.'</option>';
                    }

                           ?>
                     <!--<option value="1" onclick="jsFunction()">1</option>
                     <option value="200">2</option>
                     <option value="3">3</option>     -->
            </select><?php
              if($_REQUEST['item']){
                         ?>
                      <script>
			               //actualizar Tabla de usuarios
			                 $('#div_content_tablaUs').load("cumplanActReq.php?cousJS=<?php echo $_REQUEST['item'];?>");
                      </script>
                 <?php
                   } ?>


 <?php
 break;










}//Fin switch

?>
